package com.gemme.gemme.util;

import android.graphics.Color;
import android.graphics.drawable.GradientDrawable;

public class ShapeUtil {

    public static GradientDrawable getCornBg( int roundRadius ,String fillColor){
        GradientDrawable gd = new GradientDrawable();//创建drawable
        gd.setColor( Color.parseColor(fillColor));
        gd.setCornerRadius(roundRadius);
        return gd;
    }

/*
tv_guanzhu.setBackground(ShapeUtil.setCornBgStrok(DpUtil.dip2px(this,12.5f),"#ffffffff",
        DpUtil.dip2px(this,1f),"#FF9D2C2F"));
* */

    public static GradientDrawable setCornBgStrok(int roundRadius ,String fillColor,int stroke_width,String stroke_color ){
        GradientDrawable gd = new GradientDrawable();//创建drawable
        gd.setColor( Color.parseColor(fillColor));
        gd.setCornerRadius(roundRadius);
        gd.setStroke(stroke_width, Color.parseColor(stroke_color));
        return gd;
    }
}
